use crate::core::unit::Unit;
use std::fmt::Debug;
use std::iter::Sum;
use std::ops::{Add, Div, Mul, Sub};

pub trait Norm<T> {
    fn norm(&self) -> T;

    //设置单位向量
    fn get_identity(self) -> Self;
}

pub trait ItemOps:
    Clone
    + Div<Output = Self>
    + Mul<Output = Self>
    + Sub<Output = Self>
    + PartialEq
    + Default
    + Unit
    + Add<Output = Self>
    + Sum
    + Debug
{
}

impl<T> ItemOps for T where
    T: Clone
        + Div<Output = T>
        + Mul<Output = T>
        + Sub<Output = T>
        + PartialEq
        + Default
        + Unit
        + Add<Output = T>
        + Sum
        + Debug
{
}
